package com.beikai.mybatisplus.user.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.beikai.mybatisplus.user.model.UserModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author beikai
 * @since 2019-06-15
 */
public interface UserMapper extends BaseMapper<UserModel> {


    boolean myDelete(@Param(Constants.WRAPPER) Wrapper<UserModel> wrapper);

    @Select("delete from user ${ew.customSqlSegment}")
    void myDelete2(@Param(Constants.WRAPPER) Wrapper<UserModel> wrapper);


    /**
     * mybatis plus 分页插件接口的使用
     */
    IPage<UserModel> selectPageVo(Page page, @Param("state") Integer state);

}
